/* CPU进程分析组件样式 */
.cpu-process-analysis {
  display: flex;
  height: 100%;
  gap: 16px;
}

/* 进程列表面板 */
.process-list-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.process-list-panel .ant-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.process-list-panel .ant-card-body {
  flex: 1;
  padding: 12px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.process-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #8c8c8c;
}

.process-stats span {
  padding: 2px 6px;
  background: #f5f5f5;
  border-radius: 4px;
}

/* 表格容器 */
.table-container {
  flex: 1;
  min-height: 0;
}

.table-container .ant-table {
  font-size: 12px;
}

.table-container .ant-table-thead > tr > th {
  padding: 8px 8px;
  font-size: 12px;
  font-weight: 500;
  background: #fafafa;
}

.table-container .ant-table-tbody > tr > td {
  padding: 6px 8px;
  font-size: 12px;
}

.table-container .ant-table-tbody > tr:hover > td {
  background: #e6f7ff;
}

.table-container .ant-table-tbody > tr.selected-row > td {
  background: #bae7ff;
}

/* 进程名样式 */
.process-name {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 11px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

/* CPU进度条样式 */
.cpu-progress {
  width: 100%;
}

.cpu-progress .ant-progress {
  margin: 0;
}

.cpu-progress .ant-progress-text {
  font-size: 11px !important;
}

/* 内存显示样式 */
.memory-percent {
  font-size: 10px;
  color: #8c8c8c;
  margin-top: 2px;
}

/* 进程详情面板 */
.process-detail-panel {
  flex: 1;
  min-width: 400px;
  max-width: 500px;
}

.no-selection {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: 6px;
  border: 1px dashed #d9d9d9;
}

/* 工具未安装提示 */
.tool-not-installed {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: 6px;
}

/* 进程详情视图样式 */
.process-detail-view {
  height: 100%;
}

.process-detail-view .ant-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.process-detail-view .ant-card-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.process-basic-info .ant-descriptions {
  margin-bottom: 0;
}

.process-basic-info .ant-descriptions-item-label {
  font-size: 12px;
  font-weight: 500;
  width: 80px;
}

.process-basic-info .ant-descriptions-item-content {
  font-size: 12px;
}

.command-line {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 11px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #f5f5f5;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #e8e8e8;
}

.process-threads .ant-card-body {
  padding: 8px;
}

.process-threads .ant-table {
  font-size: 11px;
}

.process-threads .ant-table-thead > tr > th {
  padding: 6px 8px;
  font-size: 11px;
}

.process-threads .ant-table-tbody > tr > td {
  padding: 4px 8px;
  font-size: 11px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .cpu-process-analysis {
    flex-direction: column;
    gap: 12px;
  }
  
  .process-detail-panel {
    min-width: auto;
    max-width: none;
    flex: none;
    height: 400px;
  }
}

@media (max-width: 768px) {
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .process-stats {
    flex-wrap: wrap;
  }
  
  .table-container .ant-table-thead > tr > th,
  .table-container .ant-table-tbody > tr > td {
    padding: 4px 6px;
    font-size: 11px;
  }
  
  .process-name {
    max-width: 80px;
  }
  
  .command-line {
    max-width: 200px;
  }
}

/* 滚动条样式 */
.table-container .ant-table-body::-webkit-scrollbar,
.process-detail-view .ant-card-body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.table-container .ant-table-body::-webkit-scrollbar-track,
.process-detail-view .ant-card-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.table-container .ant-table-body::-webkit-scrollbar-thumb,
.process-detail-view .ant-card-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.table-container .ant-table-body::-webkit-scrollbar-thumb:hover,
.process-detail-view .ant-card-body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
